package com.zb.frame.base.exception;

/**
 * <p>
 *  自定义错误类型
 * </p>
 *
 * @author bangZZ
 * @since 2020-06-04
 */
public class SelfDefineException extends RuntimeException{

    private Integer code = 500;
    private String msg;

    public SelfDefineException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public SelfDefineException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public SelfDefineException(Integer code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public SelfDefineException(Integer code, String msg, Throwable e) {
        super(msg, e);
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
